package com.ruoyi.business.mapper;

import java.util.List;
import com.ruoyi.business.domain.TAddress;
import org.apache.ibatis.annotations.Mapper;

/**
 * 收货地址Mapper接口
 * 
 * @author laoguo
 * @date 2025-08-12
 */
@Mapper
public interface TAddressMapper 
{
    /**
     * 查询收货地址
     * 
     * @param addressId 收货地址主键
     * @return 收货地址
     */
    public TAddress selectTAddressByAddressId(Long addressId);

    /**
     * 查询收货地址列表
     * 
     * @param tAddress 收货地址
     * @return 收货地址集合
     */
    public List<TAddress> selectTAddressList(TAddress tAddress);

    /**
     * 新增收货地址
     * 
     * @param tAddress 收货地址
     * @return 结果
     */
    public int insertTAddress(TAddress tAddress);

    /**
     * 修改收货地址
     * 
     * @param tAddress 收货地址
     * @return 结果
     */
    public int updateTAddress(TAddress tAddress);

    /**
     * 删除收货地址
     * 
     * @param addressId 收货地址主键
     * @return 结果
     */
    public int deleteTAddressByAddressId(Long addressId);

    /**
     * 批量删除收货地址
     * 
     * @param addressIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTAddressByAddressIds(Long[] addressIds);

    public TAddress selectDefaultAddressByUserId(Long userId);

    void cancelOtherDefaultAddress(Long userId);
}
